<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="java.util.*" %>
<%@ page import="com.lmpop.trade.ti_admin.*" %>
<%
	String user_id = "";
	if( session.getAttribute("session_user_id") != null )
	{
		user_id = session.getAttribute("session_user_id").toString();
	}
	String cust_id = "";
	if( session.getAttribute("session_cust_id") != null )
	{
		cust_id = session.getAttribute("session_cust_id").toString();
	}
		
	Ti_adminInfo ti_adminInfo = new Ti_adminInfo();
	List list = ti_adminInfo.getListByPk(user_id);
	Hashtable map = new Hashtable();
	if(list!=null && list.size()>0) map = (Hashtable)list.get(0);
	String passwd_ques="";
	if(map.get("passwd_ques")!=null) passwd_ques = map.get("passwd_ques").toString();
%>
<html>
  <head>

    <title>用户密保修改</title>
		<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css"/>
		<script type='text/javascript' src='/dwr/interface/Ti_adminInfo.js'></script>
		<script type='text/javascript' src='/dwr/engine.js'></script>
		<script type='text/javascript' src='/dwr/util.js'></script>
		<script type="text/javascript" src="data.js"></script>
</head>

<body>
	<%
	if(passwd_ques.equals("")){
	%>
	<form action="/doTradeReg.do" method="post" name="passwd_quesForm">
		<input name="user_id" id="user_id" type="hidden" value="<%=user_id%>"/>
		<input name="cust_id" id="cust_id" type="hidden" value="<%=cust_id%>" />
		
		<table width="100%" cellpadding="1" cellspacing="1" border="0" class="listtab">
			<tr>
				<td width="20%"><p>&nbsp;</p></td>
				<td>你的原密码提示问题为空，可以修改密保</td>
			</tr>
			<tr>
				<td align="right" width="20%">
					密码提示问题<font color="red">*</font>
				</td>
				<td><input type="text" name="passwd_ques" id="passwd_ques" value="<%=passwd_ques%>" maxlength="50" size="30"/>&nbsp;50个字符以内，建议用记忆深刻的问题，比如爸爸的名字</td>
			</tr>
			<tr>
				<td align="right" width="20%">
					密码提示答案:
				</td>
				<td><input type="text" name="passwd_answer" id="passwd_answer" maxlength="50" size="30"/></td>
			</tr>
			<tr>
				<td align="right" width="20%">
					确认密码提示答案:
				</td>
				<td><input type="text" name="passwd_answer1" id="passwd_answer1" maxlength="50" size="30"/></td>
			</tr>
			
		</table>
		<table width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td align="center">
					<input type="hidden" name="bpm_id" value="9823" />
					<input class="buttoncss" type="button" name="tradeSub" value="提交" onclick="return checkAnswer()"/>&nbsp;&nbsp;
					<input class="buttoncss" type="button" name="tradeRut" value="返回" onclick="backa()"/>
				</td>
			</tr>
		</table>
	</form>
	<%
	}else{
	%>
	<form action="/doTradeReg.do" method="post" name="passwd_quesForm">
	<input name="user_id" id="user_id" type="hidden" value="<%=user_id%>"/>
	
	<table width="100%" cellpadding="1" cellspacing="1" border="0" class="listtab">
		
		<tr>
			<td align="right" width="20%">
				密码提示问题<font color="red">*</font>
			</td>
			<td><%=passwd_ques%></td>
		</tr>
		<tr>
			<td align="right" width="20%">
				密码提示答案:
			</td>
			<td><input type="text" name="passwd_answer" id="passwd_answer" maxlength="50" size="30"/>&nbsp;请先回答你的密码提示问题！</td>
		</tr>
	</table>
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input class="buttoncss" type="button" name="tradeSub" value="提交" onclick="return checkAnswer1()"/>&nbsp;&nbsp;
				<input class="buttoncss" type="button" name="tradeRut" value="返回" onclick="backa()"/>
			</td>
		</tr>
	</table>
	</form>
	<%}%>
</body>

</html>
